#include<bits/stdc++.h>

using namespace std;
int data[1000], top = -1;//stack FILO
//data[0,top]
//push data[++top]=x;
//pop top--
//query top: data[top]
//is empty? top==-1
int main() {
    top = -1;//initialize
    for (int i = 0; i < 10; i++) {
        data[++top] = i;
    }
    while (top > -1) {
        cout << data[top] << endl;
        --top;
    }
}

